<%@page import="mp3seller.entities.Admin"%>
<%@page import="mp3seller.util.UserInfo"%>
<%@page import="mp3seller.entities.Mp3"%>
<%@page import="java.util.HashMap"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Mp3 Seller</title>
</head>
<body>
	<jsp:include page = "/geral/index.jsp" />
	<h1>Lista Admins</h1>
	<%
		HashMap<Long, Admin> admins = (HashMap<Long, Admin>) request
				.getAttribute("admins");	
	%>
	<%
		if (admins != null) {
	%>
	<%
		for (Admin admin : admins.values()) {
	%>
	
		<a 
			href="ServletAdmin?flag=admin&codigo=<%=admin.getId()%>">id: <%=admin.getId()%>
			- nome: <%=admin.getName()%>
		</a>
		<br>
		<%
			}
		%>
	<%
		}
	%>
	<br>
	<%
	if(UserInfo.isAdmin()){ %>	
		<input type="button" value="Adicionar Admin" onclick="location.href='adm/admin.jsp?operation=save'" >
	<%} %>
</body>
</html>